package com.meituan.sdk.model.tuangouNg.atomgoods.productSkuStockUpdate;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 更新菜品主体库存
* This file was automatically generated.
*/
@ApiMeta(
    path = "/tuangou/ng/atomgoods/product/sku/stock/update",
    businessId = 1,
    apiVersion = "10033",
    apiName = "product_sku_stock_update",
    needAuth = true
)
public class ProductSkuStockUpdateRequest implements MeituanRequest<ProductSkuStockUpdateResponse> {
    /**
    * <p data-diff-id="ct-diff-id-fe353671-0706-4f12-a8d5-29862c4d9e05">附件信息/加价属性类型，1-总部, 2-门店</p>
    */
    @NotNull(message = "scope不能为空")
    @SerializedName("scope")
    private Integer scope;
    /**
    * <p data-diff-id="ct-diff-id-084f436f-1a57-4692-aeec-c68851749a00">总部code，当scope = 0时必填</p>
    */
    @SerializedName("vendorChainId")
    private String vendorChainId;
    /**
    * <p data-diff-id="ct-diff-id-1fa78a4d-011c-4a2d-b5b4-cdde851491a9">门店code，当scope = 1时必填</p>
    */
    @SerializedName("vendorShopId")
    private String vendorShopId;
    /**
    * <p data-diff-id="ct-diff-id-12e14152-dd57-4783-a725-4c15ab127544">主体类型：11-sku，20-加价属性，30-加料，40-餐盒</p>
    */
    @NotNull(message = "subjectType不能为空")
    @SerializedName("subjectType")
    private Integer subjectType;
    /**
    * <p data-diff-id="ct-diff-id-fcfdc0b9-68a8-4f6e-a9a0-8a65ca283ab6">批量更新的菜品主体库存</p>
    */
    @NotEmpty(message = "subjectStockList不能为空")
    @SerializedName("subjectStockList")
    private List<SkuStockListSub> subjectStockList;

    public Integer getScope() {
        return scope;
    }
    public void setScope(Integer scope) {
        this.scope = scope;
    }
    public String getVendorChainId() {
        return vendorChainId;
    }
    public void setVendorChainId(String vendorChainId) {
        this.vendorChainId = vendorChainId;
    }
    public String getVendorShopId() {
        return vendorShopId;
    }
    public void setVendorShopId(String vendorShopId) {
        this.vendorShopId = vendorShopId;
    }
    public Integer getSubjectType() {
        return subjectType;
    }
    public void setSubjectType(Integer subjectType) {
        this.subjectType = subjectType;
    }
    public List<SkuStockListSub> getSubjectStockList() {
        return subjectStockList;
    }
    public void setSubjectStockList(List<SkuStockListSub> subjectStockList) {
        this.subjectStockList = subjectStockList;
    }


    @Override
    public MeituanResponse<ProductSkuStockUpdateResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<ProductSkuStockUpdateResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "ProductSkuStockUpdateRequest{" + "scope=" + scope + "," + "vendorChainId=" + vendorChainId + "," + "vendorShopId=" + vendorShopId + "," + "subjectType=" + subjectType + "," + "subjectStockList=" + subjectStockList + "}";
    }
}
